﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharp.Study.Generic
{
    public class Unit_1_01
    {
        public static void Go()
        {
            ShowInt(666);
            ShowObject(666);
            ShowGeneric("666");
        }

        public static void ShowInt(int intParam)
        {
            //获取程序集的名
            var assemblyName = typeof(Unit_1_01).Assembly.GetName().Name;
            //获取类名
            var className = typeof(Unit_1_01).Name;
            //获取方法名
            var actionName = nameof(ShowInt);
            //获取参数类型
            var paramType = intParam.GetType().Name;
        }

        public static void ShowObject(object objParam)
        {
            //获取参数类型
            var paramType = objParam.GetType().Name;
        }

        public static void ShowGeneric<T>(T param)
        {
            //获取参数类型
            var paramType = param.GetType().Name;
        }
    }
}
